package com.julius.design.chain;

/**
 * 真实处理者2
 */
public class RealHandlerTwo extends Handler {

    @Override
    public void handleRequest(String request) {
        if(request.equals("two")){
            System.out.println("Real handler two handle request "+request);
        }else{
            if(super.getNext() != null){
                //责任传递下去
                super.getNext().handleRequest(request);
            }else{
                System.out.println("无人处理请求 "+request);
            }
        }
    }
}
